package com.google.code.coma.domain;

import com.google.code.coma.space.Id;
import com.google.code.coma.space.SpaceEntity;

import java.io.Serializable;

/**
 * @author Dominik Strasser, dominikstr@gmail.com
 */
@SpaceEntity("order_")
public class Order implements Serializable {
	@Id(generator = Id.GenerationType.AUTO_GENERATED)
	private String id;

	private int sizeOfOrder;

	private String cpuType;

	private int numberOfRAMModules;

	private boolean graphicsCard;

	private boolean finished = false;

	public Order(int sizeOfOrder, String cpuType, int numberOfRAMModules, boolean graphicsCard) {
		this.sizeOfOrder = sizeOfOrder;
		this.cpuType = cpuType;
		this.numberOfRAMModules = numberOfRAMModules;
		this.graphicsCard = graphicsCard;
	}

	public String getId() {
		return id;
	}

	public boolean isFinished() {
		return finished;
	}

	public void finish() {
		this.finished = true;
	}

	public String getCpuType() {
		return cpuType;
	}

	public int getNumberOfRAMModules() {
		return numberOfRAMModules;
	}

	public boolean isGraphicsCard() {
		return graphicsCard;
	}

	public int getSizeOfOrder() {
		return sizeOfOrder;
	}
}
